package com.ruoyi.lvlian.mapper;

import java.util.List;

import com.ruoyi.lvlian.domain.DriverInfo;
import com.ruoyi.lvlian.domain.DriverVehicleRef;
import com.ruoyi.lvlian.dto.DriverInfoDto;
import com.ruoyi.lvlian.vo.DriverInfoVo;
import com.ruoyi.lvlian.vo.IdCardInfo;
import com.ruoyi.system.api.domain.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 司机信息Mapper接口
 *
 * @author liyuxi
 * @date 2024-06-06
 */
@Repository
public interface DriverInfoMapper {
    /**
     * 查询司机信息
     *
     * @param id 司机信息主键
     * @return 司机信息
     */
    public DriverInfoVo selectDriverInfoById(String id);

    /**
     * 查询司机信息列表
     *
     * @param driverInfo 司机信息
     * @return 司机信息集合
     */
    public List<DriverInfoVo> selectDriverInfoList(DriverInfoDto driverInfo);

    /**
     * 新增司机信息
     *
     * @param driverInfo 司机信息
     * @return 结果
     */
    public int insertDriverInfo(DriverInfo driverInfo);

    /**
     * 修改司机信息
     *
     * @param driverInfo 司机信息
     * @return 结果
     */
    public int updateDriverInfo(DriverInfo driverInfo);
    public int updateDriverInfoById(DriverInfo driverInfo);


    DriverInfoVo getDriverByPhone(@Param("phone")String phone, @Param("dataSource")String dataSource);
    DriverInfoVo getPureDriverByPhone(String phone);
    int getsetVehicleCntByPhone(String phone);

    List<DriverInfoVo> getDriverBylicenseOrIdcard(String licenseNo);

    int batchSave(@Param("dtoList") List<DriverInfo> dtoList);

    int flushDriverVehicleRef();

    DriverInfoVo getDriverByPlateNo(String plateNo);
    void batchDelete( @Param("ids")  String[] ids );
    public int deleteDriverInfoByIds(String[] ids);
    public int deleteDriverInfoById(String id);
    SysUser querySysUserByPhone(DriverInfo driverInfo);

    void updateSysUser(DriverInfo driverInfo);

    List<DriverInfoVo> wechatList(DriverInfoDto driverInfo);

    int updateDriver(DriverInfo info);

    int bind(DriverVehicleRef info);

    int deleteDriverVehicleRefByIds(String[] ids);

    int approve(@Param("ids")String[] ids, @Param("dataStatus") String dataStatus);

    void updateDriverBylicenseImg(@Param("licenseNo") String licenseNo);


    public int deletedriverVehicleRefById(@Param("id")String id);


    public int updateDriverVehicleRefBind(DriverVehicleRef ref);

    DriverVehicleRef findDriverVehicleRefById(@Param("licenseNo")String licenseNo,@Param("plateNo") String plateNo);

    DriverVehicleRef findDriverVehicleRefByPhone(@Param("phone")String phone, @Param("plateNo")String plateNo);

    IdCardInfo querySysIdCardInfoById(String id);
}
